<?php
///**
// * Created by PhpStorm.
// * User: Administrator
// * Date: 2017/1/11
// * Time: 17:50
// */
//
////home
//Breadcrumbs::register('home', function($breadcrumbs)
//{
//    $breadcrumbs->push('Home', route('home'));
//});
//
//// Home > About
//Breadcrumbs::register('about', function($breadcrumbs)
//{
//    $breadcrumbs->parent('home');
//    $breadcrumbs->push('About', route('about'));
//});
//
//// Home > Blog
//Breadcrumbs::register('blog', function($breadcrumbs)
//{
//    $breadcrumbs->parent('home');
//    $breadcrumbs->push('Blog', route('blog'));
//});
//
//// Home > Blog > [Category]
//Breadcrumbs::register('category', function($breadcrumbs, $category)
//{
//    $breadcrumbs->parent('blog');
//    $breadcrumbs->push($category->title, route('category', $category->id));
//});
//
//// Home > Blog > [Category] > [Page]
//Breadcrumbs::register('page', function($breadcrumbs, $page)
//{
//    $breadcrumbs->parent('category', $page->category);
//    $breadcrumbs->push($page->title, route('page', $page->id));
//});
//
//
////Breadcrumbs::register('category', function($breadcrumbs, $category) {
////    $breadcrumbs->parent('blog');
////
////    foreach ($category->ancestors as $ancestor) {
////        $breadcrumbs->push($ancestor->title, route('category', $ancestor->id));
////    }
////
////    $breadcrumbs->push($category->title, route('category', $category->id));
////});
//
////Breadcrumbs::register('category', function($breadcrumbs, $category) {
////    if ($category->parent)
////        $breadcrumbs->parent('category', $category->parent);
////    else
////        $breadcrumbs->parent('blog');
////
////    $breadcrumbs->push($category->title, route('category', $category->slug));
////});
//
////Home / Blog / Grandparent Category / Parent Category / Category Title